﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace PloobsEngine.SceneControl
{
    internal class NonePostEffect : IPostEffect
    {
        private SpriteBatch spriteBatch;
        private EngineStuff engine;
        public void init(EngineStuff engine)
        {
            spriteBatch = EngineStuff.SpriteBatch;
            this.engine = engine;
                
        }

        public void Draw(IRenderHelper rHelper,  Microsoft.Xna.Framework.GameTime gt, Microsoft.Xna.Framework.Rectangle screenRec, IWorld world)
        {
             EngineStuff.GraphicsDevice.RenderState.DepthBufferEnable = false;
             EngineStuff.GraphicsDevice.RenderState.DepthBufferWriteEnable = false;

             spriteBatch.Begin(SpriteBlendMode.None, SpriteSortMode.Immediate, SaveStateMode.SaveState);
             spriteBatch.Draw(rHelper[PrincipalConstants.CurrentImage], screenRec, Color.White);
             spriteBatch.End();

             EngineStuff.GraphicsDevice.RenderState.DepthBufferEnable = true;
             EngineStuff.GraphicsDevice.RenderState.DepthBufferWriteEnable = true;


        }            
        


    }
}
